#ifndef _RICHTEXTFONTPAGE_H_
#define _RICHTEXTFONTPAGE_H_

#include "wx/wxprec.h"
#include "wx/bookctrl.h"
#include "wx/colordlg.h"
#include "wx/settings.h"
#include "wx/module.h"
#include "wx/imaglist.h"
#include "wx/richtext/richtextformatdlg.h"
#include "wx/richtext/richtextctrl.h"
#include "wx/richtext/richtextstyles.h"

class wxRichTextFontListBox;
class wxRichTextColourSwatchCtrl;
class wxRichTextFontPreviewCtrl;

#define SYMBOL_WXRICHTEXTFONTPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
#define SYMBOL_WXRICHTEXTFONTPAGE_TITLE _("wxRichTextFontPage")
#define SYMBOL_WXRICHTEXTFONTPAGE_IDNAME ID_RICHTEXTFONTPAGE
#define SYMBOL_WXRICHTEXTFONTPAGE_SIZE wxSize(400, 300)
#define SYMBOL_WXRICHTEXTFONTPAGE_POSITION wxDefaultPosition

class wxRichTextFontPage: public wxPanel {
    DECLARE_DYNAMIC_CLASS( wxRichTextFontPage )
    DECLARE_EVENT_TABLE()
  public:
    wxRichTextFontPage( );
    wxRichTextFontPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
    void Init();
    bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
    void CreateControls();
    virtual bool TransferDataFromWindow();
    virtual bool TransferDataToWindow();
    void UpdatePreview();
    void OnFaceListBoxSelected( wxCommandEvent& event );
    void OnColourClicked( wxCommandEvent& event );
    wxTextAttrEx* GetAttributes();
    void OnFaceTextCtrlUpdated( wxCommandEvent& event );
    void OnSizeTextCtrlUpdated( wxCommandEvent& event );
    void OnSizeListBoxSelected( wxCommandEvent& event );
    void OnStyleCtrlSelected( wxCommandEvent& event );
    void OnWeightCtrlSelected( wxCommandEvent& event );
    void OnUnderliningCtrlSelected( wxCommandEvent& event );
    void OnStrikethroughctrlClick( wxCommandEvent& event );
    void OnCapsctrlClick( wxCommandEvent& event );
    void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event );
    void OnRichtextfontpageSubscriptClick( wxCommandEvent& event );
    wxBitmap GetBitmapResource( const wxString& name );
    wxIcon GetIconResource( const wxString& name );
    static bool ShowToolTips();
    wxTextCtrl* m_faceTextCtrl;
    wxRichTextFontListBox* m_faceListBox;
    wxTextCtrl* m_sizeTextCtrl;
    wxListBox* m_sizeListBox;
    wxComboBox* m_styleCtrl;
    wxComboBox* m_weightCtrl;
    wxComboBox* m_underliningCtrl;
    wxRichTextColourSwatchCtrl* m_colourCtrl;
    wxRichTextColourSwatchCtrl* m_bgColourCtrl;
    wxCheckBox* m_strikethroughCtrl;
    wxCheckBox* m_capitalsCtrl;
    wxCheckBox* m_superscriptCtrl;
    wxCheckBox* m_subscriptCtrl;
    wxRichTextFontPreviewCtrl* m_previewCtrl;
    enum {
      ID_RICHTEXTFONTPAGE = 10000,
      ID_RICHTEXTFONTPAGE_FACETEXTCTRL = 10001,
      ID_RICHTEXTFONTPAGE_FACELISTBOX = 10002,
      ID_RICHTEXTFONTPAGE_SIZETEXTCTRL = 10005,
      ID_RICHTEXTFONTPAGE_SIZELISTBOX = 10006,
      ID_RICHTEXTFONTPAGE_STYLECTRL = 10007,
      ID_RICHTEXTFONTPAGE_WEIGHTCTRL = 10004,
      ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL = 10008,
      ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
      ID_RICHTEXTFONTPAGE_BGCOLOURCTRL = 10014,
      ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
      ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,
      ID_RICHTEXTFONTPAGE_SUPERSCRIPT = 10012,
      ID_RICHTEXTFONTPAGE_SUBSCRIPT = 10013,
      ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10003
    };

    bool m_dontUpdate;
    bool m_colourPresent;
    bool m_bgColourPresent;
};

#endif
